﻿using Microsoft.Extensions.Configuration;

namespace DataTransfer.Core.Configurations
{
    public class ExcelImportSheetSetting
    {
        const string SHEET_NAME = "sheetName";
        const string OPERATE_NAME = "operateName";
        const string HEADER_ROW_INDEX = "headerRowIndex";
        const string START_ROW_INDEX = "startRowIndex";
        const string FIELDS = "fields";

        /// <summary>
        /// 表名称
        /// </summary>
        [ConfigurationKeyName(SHEET_NAME)]
        public string SheetName
        {
            get;
            set;
        }
        /// <summary>
        /// 数据操作名称
        /// </summary>
        [ConfigurationKeyName(OPERATE_NAME)]
        public string OperateName
        {
            get;
            set;
        }
        [ConfigurationKeyName(HEADER_ROW_INDEX)]
        public int HeaderRowIndex
        {
            get;
            set;
        }
        [ConfigurationKeyName(START_ROW_INDEX)]
        public int StartRowIndex
        {
            get;
            set;
        } = 1;
        /// <summary>
        /// 
        /// </summary>
        [ConfigurationKeyName(FIELDS)]
        public ExcelImportSheetFieldSettingCollection Fields
        {
            get;
            set;
        }
    }
}